' file encode gbk
Sub micro()
    ' 需要遍历的文件夹路径，如果更换路径只需要修改这里即可
    path = "C:\Users\Admin\Desktop\test"
    ' 获取文件夹及其子文件夹下所有文件
    set files = getSubFile(path)
    For Each f In files
        ' 遍历所有文件，判断是否为excel文件
        If isExcel(f) Then
            ' 设置不显示0
            setZero f
        End If
    Next
End Sub

Function isExcel(path) As Boolean
    ' 判断是否是excel
    isExcel = (path Like "*.XLS") Or (path Like "*.xls") Or (path Like "*.xlsx")
    Debug.Print isExcel, path
End Function

Function setZero(filePath)
    ' 设置零值，打开当前文件
    Workbooks.Open Filename:=filePath
    ' 遍历文件的 worksheet
    For Each Sheet In Worksheets:
        ' 选中当前sheet
        Sheets(Sheet.Name).Select
        ' 设置当前sheet不显示0
        ActiveWindow.DisplayZeros = False
        ' 保存当前sheet
        ActiveWorkbook.Save
    Next
    ' 关闭打开文件
    ActiveWindow.Close
End Function

Function getSubFile(path) As Object
    ' 获取所有所有文件，并将起装入 arraylist中
    Dim files As Object
    Set files = CreateObject("System.Collections.ArrayList")
    subWalkPath path, files
    set getSubFile = files
End Function

Function subWalkPath(path, ByRef files As Object)
    ' 遍历文件夹及其子文件，并获取所有子文件
    Set fso = CreateObject("Scripting.FileSystemObject")
    Set fd1 = fso.GetFolder(path)
    If fd1.subfolders.count > 0 Then
        For Each fd2 In fd1.subfolders
            subWalkPath fd2.path, files
        Next
    End If

    If fd1.files.count > 0 Then
        Set fs = fd1.files
        For Each f In fs
             files.Add f.path
        Next
    End If
End Function